package cn.edu.scujcc;


	import java.util.List;

	import org.springframework.beans.factory.annotation.Autowired;

	import org.springframework.web.bind.annotation.GetMapping;
	import org.springframework.web.bind.annotation.PathVariable;
	import org.springframework.web.bind.annotation.PostMapping;

	import org.springframework.web.bind.annotation.RequestMapping;
	import org.springframework.web.bind.annotation.RestController;


	@RestController
	@RequestMapping("/broadcast")
	public class BroadcastController {
		@Autowired
		private  BroadcastService service;
		@GetMapping
		public List<Broadcast> getAllBroadcast(){
			List<Broadcast>result = null;
			result = service.getAllBroadcast();
			return result;
		}
		@GetMapping("/{id}")
		public Broadcast getBroadcast(@PathVariable String id) {
			Broadcast result = null;
		result = service.getBroadcast(id);
		return result;
		}
		
		@PostMapping("/comment")
		public  Broadcast createComment(@PathVariable String comment) {
			Broadcast result = null;
		result = service.createComment(comment);
		return result;
		}


}
